#define  _CRT_SECURE_NO_WARNINGS  1
#include <stdio.h>
int main()
{
	int a[1000] = { 0 };
	int i = 0;
	int n = 0;
	scanf("%d", &n);
	for (i = 0; i < n; i++)
	{
		scanf("%d", &a[i]);
	}
	int target;
	int judge = 0;
	scanf("%d", &target);
	for (i = 0; i < n; i++)
	{
		if (a[i] == target)
		{
			judge = 1;
			break;
		}
	}
	if (judge)
	{
		printf("%d", i + 1);
	}
	else
	{
		printf("-1");
	}
	return 0;
}